﻿using System;
using System.IO;
using System.Reflection;
using System.Windows;

namespace GaleSong
{
    public class GaleSongApplication : Application
    {
        public GaleSongApplication()
        {
            Exit += OnExit;
        }

        private void OnExit(object sender, ExitEventArgs exitEventArgs)
        {
            Global.Exit(null);
        }

        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            Global.Initalize(null);

            var window = new MainWindow() { DataContext = IoC.Get<IMainService>() };
            window.Show();
        }
    }
}